<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
    <div id='app'>
        {{msg}}====
        <hr>
        <com1 :qq='list'>
            <template slot-scope='demo'>
                <!-- {{demo}}== -->
                <p>****{{demo.tt.name}}****</p>
            </template>

        </com1>
    </div>
    <script type='text/javascript'>
        var com1 = {
            props:['qq'],
            template: `<div>
                我是一个组件
                    <ul>
                        <li v-for='item in  qq'>
                            ===={{item.name}}====
                            <slot :tt='item'></slot>
                        </li>
                    </ul>
                </div>`,
            data() {
                return {

                }
            }
        }
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue',
                list: [
                    { id: 1, name: 'jack' },
                    { id: 2, name: 'rose' },
                    { id: 3, name: 'tom' }
                ]
            },
            components: {
                com1
            }
        });
    </script>
</body>

</html>